<?php
require_once('libs/smarty/Smarty.class.php');
class V_View extends Smarty
{
    public function  __construct() {
        $this->template_dir = V_Config::getValue('path','skin');
        $this->compile_dir = V_Config::getValue('path','view').'compile/';
        $this->config_dir = V_Config::getValue('path','view').'config/';
        $this->cache_dir = V_Config::getValue('path','view').'cache/';
        $this->assign('ViewSkinDir',$this->template_dir);
        // Создание списка групп
       	$groups=V_DB::fetchAll('SELECT * FROM v_user_groups');
        // Создание списка цен на смс
        $sms_price=V_DB::fetchAll('SELECT * FROM v_sms_price');
        if (isset ($groups)) $this->assign('VArrayGroups',$groups);
        if (isset ($sms_price)) $this->assign('VArraySmsPrice',$sms_price);
       	$this->assign ('VRoutePage',V_Router::getPage());
       	$this->assign ('VRouteAction',V_Router::getAction());
       	$this->assign ('VRouteId',V_Router::getId());
       	$this->assign ('VUserGroup',V_User::getGroup());
       	$this->assign ('VUserCity',V_User::getCity());
        
    }
}